package com.baijiayun.liveuibase.error

import androidx.lifecycle.ViewModel

/**
 * Created by pengwenjian on 2020/11/16
 * Describe:
 */
class ErrorViewModel : ViewModel() {

    var handlerWay: ErrorFragment.ErrorType = ErrorFragment.ErrorType.ERROR_HANDLE_CONFILICT

    lateinit var content: String

    var positiveText: String = "继续连接"

    var negativeText: String = "退出"

    fun init(handlerWay: ErrorFragment.ErrorType, content: String = "", positiveText: String = "", negativeText: String = "") {
        this.handlerWay = handlerWay
        this.content = content
        if (positiveText.isNotEmpty()) {
            this.positiveText = positiveText
        }
        if (negativeText.isNotEmpty()) {
            this.negativeText = negativeText
        }
    }
}